<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <form action="" id="form" method="post" style="display: none">
        <input type="hidden" name="username" id="username">
        <input type="hidden" name="password" id="password">
    </form>
</body>
</html>
<script src="../jquery/jquery-2.2.0.min.js"></script>
<script src="../js/public.js"></script>
<script>
    loading();
    function GetRequest() {
        var url = location.search; //获取url中"?"符后的字串
        console.log(url);
        var theRequest = new Object();
        if (url.indexOf("?") != -1) {
            var str = url.substr(1);
            strs = str.split("&");
            console.log(strs)
            for(var i = 0; i < strs.length; i ++) {
                theRequest[strs[i].split("/")[0]]=unescape(strs[i].split("/")[1]);
            }
        }
        return theRequest;
    }
    var userName = GetRequest().UN;
    var passWord = GetRequest().PW;
    var loginAddress = GetRequest().loginAddress;
    $('#username').val(userName);
    $('#password').val(passWord);
    loginAddress = "http://"+loginAddress+"/hospital/loginHospital";
    $('#form').attr("action",loginAddress);
    $('#form').submit();
</script>